<?php

namespace app\api\controller\v1;

use app\common\controller\Api;
use app\common\model\Search;
use app\common\model\Dynamic;

/**
 * 接口
 */
class Baseset extends Api
{
    protected $noNeedLogin = ['searchkey','dynamiclist'];
    protected $noNeedRight = [''];
    
    /**
     * [_initialize 初始化]
     * @return [type] [description]
     */
    public function _initialize()
    {
        parent::_initialize();
    }
    /**
     * Undocumented function
     * 关键字列表
     * @Author XiaoLiu 528772568@qq.com
     * @DateTime 2020-06-04 11:41:41
     * @return void
     */
     public function searchkey()
    {
        $arr = Search::where(['status' => 1])->field('status,createtime,updatetime',true)->order('weigh DESC')->select();
        $this->success('',$arr);
    }
    /**
     * Undocumented function
     * 动态列表
     * @Author XiaoLiu 528772568@qq.com
     * @DateTime 2020-06-04 11:43:46
     * @return void
     */
    public function dynamiclist(){
        $arr = Dynamic::where('status',1)->field('status,weigh,updatetime',true)->order('weigh DESC')->select();
        $this->success('',$arr);
    }
}